<?php
header("Content-type:text/html; charset=gbk;");

$config = include('config.php');

$redis = include('conn.php');

$action = isset($_GET["action"]) ? $_GET["action"] : "";

$p1 = isset($_GET['p1']) ? addslashes($_GET['p1']) : "";
$p2 = isset($_GET['p2']) ? addslashes($_GET['p2']) : "";
$p3 = isset($_GET['p3']) ? addslashes($_GET['p3']) : "";
$p4 = isset($_GET['p4']) ? addslashes($_GET['p4']) : "";

if($action == "hset"){
	
	$result = $redis->hset($p1, $p2, $p3);
	var_dump($result);exit;
	
}else if($action == "hget"){
	
	$result = $redis->hget($p1, $p2);
	var_dump($result);exit;
	
}else if($action == "hLen"){
	
	$result = $redis->hLen($p1);
	var_dump($result);exit;
	
}else if($action == "hDel"){
	
	$result = $redis->hDel($p1, $p2);
	var_dump($result);exit;
	
}else if($action == "hKeys"){
	
	$result = $redis->hKeys($p1);
	var_dump($result);exit;
	
}else if($action == "hVals"){
	
	$result = $redis->hVals($p1);
	var_dump($result);exit;
	
}else if($action == "hGetAll"){
	
	$result = $redis->hGetAll($p1);
	var_dump($result);exit;
	
}else if($action == "hExists"){
	
	$result = $redis->hExists($p1, $p2);
	var_dump($result);exit;
	
}else if($action == "hIncrBy"){
	
	$result = $redis->hIncrBy($p1, $p2, $p3);
	var_dump($result);exit;
	
}





?>
